class Student(object):
    count = 0
    def __init__(self, name):
        self.__name = name
        self.__get_count()  #创建一个私有函数，用来计算count
    def __get_count(self):
        Student.count +=1   # 类属性增加


# 测试

lsb = Student('lsb')
print(Student.count)

smh = Student('smh')
print(Student.count)
